﻿/* General Styles */

html {
    overflow: hidden;
    height: 100%;
}
body {
    margin: 0;
    padding: 0;
    background-color: #d3d3d3; /* Light gray background */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    font-family: Arial, sans-serif;
}

/* Fullscreen overlay to cover the controller */
#nameInputOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Centered input box */
.nameInputBox {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 90%; /* Responsive width */
    max-width: 320px; /* Don't let it get too wide */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive input field */
#playerName {
    width: 90%;
    padding: 10px;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    margin-top: 10px;
}

/* Mobile-friendly button */
button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    font-size: 18px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

    button:hover {
        background: #218838;
    }

#controller {
    display: none;
    justify-content: space-between;
    width: 90%;
    height: fit-content;
    background-color: #a0a0a0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin: 300px 0px 0px 0px;
    position: relative;
}

/* Info Screen */
#info-screen {
    display: none;
    position: absolute;
    top: 20px;
    width: 90%;
    height: 300px;
    background-color: #000;
    border-radius: 10px;
}

/* Directional Pad */
#dpad {
    display: grid;
    grid-template-areas:
        ". up ."
        "left . right"
        ". down .";
    gap: 5px;
    width: 45%;
    aspect-ratio: 1 / 1;
}

.dpad-button {
    width: auto;
    height: auto;
    background-color: #555;
    border-radius: 10px;
    box-shadow: 0 6px #333;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s linear, box-shadow 0.1s linear;
}

    .dpad-button.active {
        transform: translateY(6px);
        box-shadow: 0 0 #333;
    }

    /* Directional Icons */
    .dpad-button svg,
    .dpad-button svg * {
        pointer-events: none;
        width: auto;
        height: auto;
        fill: white;
    }

/* Action Buttons */
#action-buttons {
    display: grid;
    grid-template-areas:
        ". x ."
        "y . a"
        ". b .";
    gap: 0px;
    width: 45%;
    aspect-ratio: 1 / 1;
}

#action-buttons2{
    display: grid;
    grid-template-areas:
        ". a"
        "b .";
    gap: 0px;
    width: 45%;
    aspect-ratio: 1 / 1;
}

.action-button {
    display: grid;
    width: auto;
    height: auto;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.1s linear, box-shadow 0.1s linear;
}

    .action-button.active {
        transform: translateY(6px);
        box-shadow: 0 0 rgb(0, 0, 0);
    }

#button-a {
    background-color: firebrick;
}

#button-b {
    background-color: royalblue;
}

#button-x {
    background-color: goldenrod;
}

#button-y {
    background-color: forestgreen;
}
